package com.itheima.no.mstring;

import java.util.Scanner;

public class StringDemo01 {
    public static void main(String[] args) {
        String c="qwert";
        String b="123456";
        Scanner sc=new Scanner(System.in);
        for (int i = 1; i <= 3; i++) {
            System.out.println("请输入账号");
            String s = sc.next();
            System.out.println("请输入密码");
            String s1 = sc.next();
            if(s.equals(c)&&s1.equals(b)){
                System.out.println("登录成功");
                break;
            }else{
                if(i==3){
                    System.out.println("你今天的次数用完了明天再来");
                }else{
                    System.out.println("登陆失败");
                    System.out.println("你还有"+(3-i)+"次机会");
                }
            }
        }

    }
}
